/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jogocartas;

import java.awt.Frame;
import java.awt.Toolkit;
import java.net.MalformedURLException;
import java.net.URL;
import javax.media.MediaLocator;
import javax.swing.JFrame;


/**
 *
 * @author sota
 */
public class JogoCartas {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws InterruptedException, MalformedURLException {

        inicia();


        MediaLocator mediaURL = new MediaLocator("file://abertura.avi");
        JFrame mediaTest = new JFrame("Testing ");
        mediaTest.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        MediaPanel mediaPanel = new MediaPanel(mediaURL,);
        mediaTest.add(mediaPanel);



    
        final tabuleiro tela = new tabuleiro();
        tela.setVisible(true);

    }

    public static void inicia() {
        Frame splashFrame = null;
        URL imageURL = jogocartas.SplashWindow.class.getResource("splash.png");
        if (imageURL != null) {
            splashFrame = SplashWindow.splash(
                    Toolkit.getDefaultToolkit().createImage(imageURL));
        } else {
            System.err.println("nao achei a imagem");
        }
        try {
            for (int i = 0; i <= 100; i++) {
                Thread.sleep(50);
            }
        } catch (Throwable e) {
            e.printStackTrace();
            System.err.flush();
            System.exit(10);
        }
        if (splashFrame != null) {
            splashFrame.dispose();
        }
    }
}
